/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo h1 {
    color: #e74c3c;
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #e74c3c;
    color: #fff;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 主要内容区域 */
.main {
    padding: 2rem 0;
}

/* 轮播图样式 */
.carousel-section {
    margin-bottom: 3rem;
}

.carousel {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    padding: 2rem;
}

.carousel-content h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.carousel-content p {
    font-size: 1rem;
    opacity: 0.9;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.8);
}

.carousel-btn.prev {
    left: 1rem;
}

.carousel-btn.next {
    right: 1rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.indicator.active {
    background: #fff;
}

/* 新闻列表样式 */
.news-section {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 0.5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-content {
    padding: 1.5rem;
}

.news-card-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.4;
}

.news-card-summary {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
}

.news-card-category {
    background: #e74c3c;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.loading i {
    margin-right: 0.5rem;
}

/* 页脚样式 */
.footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-list {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .carousel-item img {
        height: 250px;
    }
    
    .carousel-content {
        padding: 1rem;
    }
    
    .carousel-content h3 {
        font-size: 1.4rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .carousel-item img {
        height: 200px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}
